#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

QTextEdit *Widget::getTextEdit()
{
    return ui->textEdit;
}

QPlainTextEdit *Widget::getPlainTextEdit()
{
    return ui->plainTextEdit;
}

void Widget::on_pushButton_clicked()
{
    qDebug() << "调试信息（会被重定向）";
    qDebug() << "hello world!";
    qInfo() <<"日志系统正常运行";
    qInfo()<<"the log system is OK";
    qWarning() << "警告信息";
    qWarning() << "This is a Warning";
    qCritical()<< "出现错误";
    qCritical()<< "the Error is now";
    //qFatal()<<"程序异常Keill";
}

